package com.netease.pris.activity.a;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListAdapter;
import android.widget.SectionIndexer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

public class al extends BaseAdapter
  implements SectionIndexer
{
  protected ArrayList a = new ArrayList();
  protected ArrayList b = new ArrayList();
  HashMap c = new HashMap();

  public ListAdapter a(int paramInt)
  {
    Iterator localIterator = this.a.iterator();
    ListAdapter localListAdapter;
    int i;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      i = localListAdapter.getCount();
      if (paramInt >= i);
    }
    while (true)
    {
      return localListAdapter;
      paramInt -= i;
      break;
      localListAdapter = null;
    }
  }

  public ListAdapter a(String paramString, int paramInt)
  {
    ListAdapter localListAdapter = (ListAdapter)this.c.get(paramString);
    if (paramInt == 0)
      if (!this.a.contains(localListAdapter));
    while (true)
    {
      return localListAdapter;
      int i = this.b.indexOf(localListAdapter);
      if (i == -1)
        continue;
      for (int j = i - 1; ; j--)
      {
        if (j < 0)
          break label103;
        int k = this.a.indexOf(this.b.get(j));
        if (k <= -1)
          continue;
        this.a.add(k + 1, localListAdapter);
        break;
      }
      label103: this.a.add(0, localListAdapter);
      continue;
      this.a.remove(localListAdapter);
    }
  }

  public void a()
  {
    try
    {
      this.c.clear();
      this.b.clear();
      this.a.clear();
      return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
    }
  }

  public void a(String paramString, View paramView)
  {
    a(paramString, paramView, false);
  }

  public void a(String paramString, View paramView, boolean paramBoolean)
  {
    ArrayList localArrayList = new ArrayList(1);
    localArrayList.add(paramView);
    a(paramString, localArrayList, paramBoolean);
  }

  public void a(String paramString, ListAdapter paramListAdapter)
  {
    this.c.put(paramString, paramListAdapter);
    this.b.add(paramListAdapter);
    paramListAdapter.registerDataSetObserver(new ah(this, null));
  }

  public void a(String paramString, List paramList)
  {
    a(paramString, paramList, false);
  }

  public void a(String paramString, List paramList, boolean paramBoolean)
  {
    if (paramBoolean)
      a(paramString, new c(paramList));
    while (true)
    {
      return;
      a(paramString, new aj(paramList));
    }
  }

  public boolean areAllItemsEnabled()
  {
    return false;
  }

  public int getCount()
  {
    Iterator localIterator = this.a.iterator();
    int i = 0;
    while (localIterator.hasNext())
      i += ((ListAdapter)localIterator.next()).getCount();
    return i;
  }

  public Object getItem(int paramInt)
  {
    Iterator localIterator = this.a.iterator();
    ListAdapter localListAdapter;
    int i;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      i = localListAdapter.getCount();
      if (paramInt >= i);
    }
    for (Object localObject = localListAdapter.getItem(paramInt); ; localObject = null)
    {
      return localObject;
      paramInt -= i;
      break;
    }
  }

  public long getItemId(int paramInt)
  {
    Iterator localIterator = this.a.iterator();
    int i;
    long l;
    if (localIterator.hasNext())
    {
      ListAdapter localListAdapter = (ListAdapter)localIterator.next();
      i = localListAdapter.getCount();
      if (paramInt < i)
        l = localListAdapter.getItemId(paramInt);
    }
    while (true)
    {
      return l;
      paramInt -= i;
      break;
      l = -1L;
    }
  }

  public int getItemViewType(int paramInt)
  {
    Iterator localIterator = this.a.iterator();
    int i = 0;
    ListAdapter localListAdapter;
    int k;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      k = localListAdapter.getCount();
      if (paramInt >= k);
    }
    for (int j = i + localListAdapter.getItemViewType(paramInt); ; j = -1)
    {
      return j;
      paramInt -= k;
      i += localListAdapter.getViewTypeCount();
      break;
    }
  }

  public int getPositionForSection(int paramInt)
  {
    int i = 0;
    Iterator localIterator = this.a.iterator();
    int j = 0;
    ListAdapter localListAdapter;
    Object[] arrayOfObject;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      if (!(localListAdapter instanceof SectionIndexer))
        break label96;
      arrayOfObject = ((SectionIndexer)localListAdapter).getSections();
      if (arrayOfObject == null)
        break label111;
    }
    label96: label111: for (int k = arrayOfObject.length; ; k = 0)
    {
      if (paramInt < k)
      {
        i = j + ((SectionIndexer)localListAdapter).getPositionForSection(paramInt);
        return i;
      }
      if (arrayOfObject != null)
        paramInt -= k;
      j += localListAdapter.getCount();
      break;
    }
  }

  public int getSectionForPosition(int paramInt)
  {
    int i = 0;
    Iterator localIterator = this.a.iterator();
    int j = 0;
    ListAdapter localListAdapter;
    int k;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      k = localListAdapter.getCount();
      if (paramInt >= k)
        break label73;
      if ((localListAdapter instanceof SectionIndexer))
        i = j + ((SectionIndexer)localListAdapter).getSectionForPosition(paramInt);
    }
    return i;
    label73: Object[] arrayOfObject;
    if ((localListAdapter instanceof SectionIndexer))
    {
      arrayOfObject = ((SectionIndexer)localListAdapter).getSections();
      if (arrayOfObject == null);
    }
    for (int m = j + arrayOfObject.length; ; m = j)
    {
      paramInt -= k;
      j = m;
      break;
    }
  }

  public Object[] getSections()
  {
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = this.a.iterator();
    while (localIterator.hasNext())
    {
      ListAdapter localListAdapter = (ListAdapter)localIterator.next();
      if (!(localListAdapter instanceof SectionIndexer))
        continue;
      Object[] arrayOfObject2 = ((SectionIndexer)localListAdapter).getSections();
      if (arrayOfObject2 == null)
        continue;
      int i = arrayOfObject2.length;
      for (int j = 0; j < i; j++)
        localArrayList.add(arrayOfObject2[j]);
    }
    if (localArrayList.size() == 0);
    for (Object[] arrayOfObject1 = null; ; arrayOfObject1 = localArrayList.toArray(new Object[0]))
      return arrayOfObject1;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    Iterator localIterator = this.a.iterator();
    ListAdapter localListAdapter;
    int i;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      i = localListAdapter.getCount();
      if (paramInt >= i);
    }
    for (View localView = localListAdapter.getView(paramInt, paramView, paramViewGroup); ; localView = null)
    {
      return localView;
      paramInt -= i;
      break;
    }
  }

  public int getViewTypeCount()
  {
    Iterator localIterator = this.a.iterator();
    int i = 0;
    while (localIterator.hasNext())
      i += ((ListAdapter)localIterator.next()).getViewTypeCount();
    return Math.max(i, 1);
  }

  public boolean isEnabled(int paramInt)
  {
    Iterator localIterator = this.a.iterator();
    ListAdapter localListAdapter;
    int i;
    if (localIterator.hasNext())
    {
      localListAdapter = (ListAdapter)localIterator.next();
      i = localListAdapter.getCount();
      if (paramInt >= i);
    }
    for (boolean bool = localListAdapter.isEnabled(paramInt); ; bool = false)
    {
      return bool;
      paramInt -= i;
      break;
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.a.al
 * JD-Core Version:    0.6.0
 */